<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" xmlns:th="http://www.thymeleaf.org/">
    <title>Title</title>
</head>
<script>
    function add() {
        alert("增加老师成功");
    }
</script>
<body>
<table border="1">
    <tr>
        <td>课程编号</td>
        <td>课程名称</td>
        <td>老师编号</td>
        <td>操作</td>
    </tr>
    <tr th:each="concat:${cs}">
        <td th:text="${concat.cno}"></td>
        <td th:text="${concat.cname}"></td>
        <td th:text="${concat.tno}"></td>
        <td>
            <a  th:href="@{'/course/getById/'+${concat.cno}}">修改</a>
            <a  th:href="@{'/course/deleteCourse/'+${concat.cno}}">删除</a>
        </td>
    </tr>
</table>

<div>
    <title>新增课程</title>
    <form action="/course/addCourse"method="post">
        课程名: <input type="text" th:value="${cname}" name="cname"><br>
        老师编号: <input type="text" th:value="${tno}" name="tno"><br>
        <button  onclick="add()" type="submit">添加课程</button>
    </form>
</div>
</body>
</html>